package com.tanklab.signature.entity;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import io.swagger.annotations.ApiModel;
import lombok.Data;
import lombok.EqualsAndHashCode;
import lombok.experimental.Accessors;

import java.util.Date;

@Data
@EqualsAndHashCode(callSuper = false)
@Accessors(chain = true)
@ApiModel(value="申请对象", description="申请信息表")
@TableName("request")
public class Request {

    @TableId(value = "id_request", type = IdType.AUTO)
    private Long idRequest;

    // 关联的文件ID
    @TableField("file_id")
    private Long fileId;

    // 申请名称
    @TableField("name_request")
    private String nameRequest;

    // 申请类型
    @TableField("type_request")
    private String typeRequest;

    // 申请者openid
    @TableField("initiator_openid")
    private String initiatorOpenid;

    // 申请创建时间
    @TableField("created_time")
    private String createdTime;

    // 申请状态 (pending:待审批, approved:通过, rejected:拒绝)
    @TableField("status")
    private String status;

    // 审批意见
    @TableField("comments")
    private String comments;

    // 申请信息哈希 (不包含状态、审批人等可变信息)
    @TableField("request_info_hash")
    private String requestInfoHash;

    // 申请信息交易ID
    @TableField("request_tx_id")
    private String requestTxId;
}